package com.demo.mybatis.typehandle.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.demo.mybatis.typehandle.support.CustomJacksonTypeHandler;
import lombok.Data;

@TableName(autoResultMap = true)
@Data
public class User {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @TableField(typeHandler = CustomJacksonTypeHandler.class)
    private UserExtra name;
}
